<%--
  Created by IntelliJ IDEA.
  User: YANG
  Date: 2019/11/7
  Time: 16:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>企业基本信息</title>
    <script src="Js/jquery-3.4.1.min.js"></script>
    <style type="text/css">
        body{
            background-color: #ECFFF2;
        }
        .center{
            margin: 0 auto;
            width: 500px;
        }
        .center input,.center select{
            margin-top: 10px;
            width:180px;
            height:30px;
        }
        input[type="submit"]{
            color: white;
            width: 60px;
            height: 36px;
            background-color:  #6699CC;
            border: 0 solid #6699CC;
        }
        input[type="reset"]{
            color: white;
            width: 60px;
            height: 36px;
            background-color:  #6699CC;
            border: 0 solid #6699CC;
        }
        form{
            color: white;
            background-color: #6699CC;
        }
    </style>
</head>
<body>
<script>
    $(document).ready(function () {
        $.ajax({
            type:"GET",
            url:"GetCompanyBase",
            data:{
                UserID:<%=session.getAttribute("UserID")%>
            },
            success:function (res) {
                $("#CompanyName").attr("value",res.json.CompanyName)
                $("#CompanyCorporation").attr("value",res.json.CompanyCorporation)
                $("#CompanyNature").attr("value",res.json.CompanyNature)
                $("#CompanyAddress").attr("value",res.json.CompanyAddress);
                $("#CompanyType ").get(0).selectedIndex=res.json.CompanyType-1;
                $("#CompanyScale ").get(0).selectedIndex=res.json.CompanyScale-1;
                $("#CompanyTelphone").attr("value",res.json.CompanyTelphone)
                $("#CompanyEmail").attr("value",res.json.CompanyEmail)
                $("#CompanyIntroduce").val(res.json.CompanyIntroduce)

            },
            error:function () {

            }
        })
    })
</script>
<div class="center">
    <form action="CompanyBase" method="post">
    <label>企业名称</label><input id="CompanyName" name="companybase.CompanyName" type="text">
    <label>企业法人</label><input id="CompanyCorporation" name="companybase.CompanyCorporation" type="text"><br>
    <label>企业性质</label><input id="CompanyNature" name="companybase.CompanyNature" type="text">
    <label>企业规模</label><select  id="CompanyScale" name="companybase.CompanyScale" type="text"><option value="1">100人以下</option></select><br>
    <label>企业类型</label><select id="CompanyType" name="companybase.CompanyType" type="text"><option value="1">上市企业</option></select>
    <label>企业地址</label><input  id="CompanyAddress" name="companybase.CompanyAddress" type="text"><br>
    <label>联系电话</label><input id="CompanyTelphone" name="companybase.CompanyTelphone" type="text">
    <label>企业邮箱</label><input id="CompanyEmail" name="companybase.CompanyEmail" type="text"><br>
    <label>营业执照</label><s:file id="Companylicense" name="companybase.Companylicense" type="text"></s:file><br>
    <label>企业介绍</label><textarea id="CompanyIntroduce" name="companybase.CompanyIntroduce" style="width: 100%;height: 230px"></textarea><br>
        <div style="margin-left:200px;">
            <input type="submit" value="保存">
            <input type="reset"  value="重置">
        </div>
    </form>
    </div>
</body>
</html>
